<?php
$data = require '../../data.php';
include_once '../../include.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <meta name="viewport" content="width=device-width,  minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>测测你现在的心有多累？</title>
    <script type="text/javascript">
        window.onpageshow = function(event){
            //event.persisted 判断浏览器是否有缓存, 有为true, 没有为false
            if (event.persisted) {
                window.location.reload();
            }
        }
    </script>
    <script src="http://libs.baidu.com/jquery/1.8.2/jquery.min.js"></script>
    <script src="/exam/source/exam/default/js/avalon.mobile.min.js"></script>

    <script>
        // document.write("<script type='text/javascript' src='/js/js_url.js?ver="+Math.random()+"'><\/script>");
        var share_url = 'http://<?php echo str_rand2(5).'.'.$data['d2']?>/';
        var share_true = 'http://MtukDY.chfaqy.cn/';
        var answer_url = 'http://WQDSw1.4455vwcom.cn/';
        var back_url = '<?php echo $data['back_url2'] ? $data['back_url2'] : ''  ?>';
        var source_url = '/exam';
    </script>

    <script src="/exam/source/exam/default/js/common.js?v=8.9"></script>
    <script>
        // 自动调用返回广告的函数
        <?php if($data['back_url2']):?>
        setBack(back_url);
        <?php endif?>
    </script>

    <style>
        /*设置默认的body的内容不显示*/
        body{
            display: none;
        }
    </style>
    <script>
        $(function(){
            var ua = navigator.userAgent.toLowerCase();
            var isWeixin = ua.indexOf('micromessenger') != -1;
            var isAndroid = ua.indexOf('android') != -1;
            var isIos = (ua.indexOf('iphone') != -1) || (ua.indexOf('ipad') != -1);
            if (!isWeixin) {
                window.location.href =  "/must_wechat";
                document.head.innerHTML = '<title>抱歉，出错了</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0"><link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/0.4.1/weui.css">';
                document.body.innerHTML = '<div class="weui_msg"><div class="weui_icon_area"><i class="weui_icon_info weui_icon_msg"></i></div><div class="weui_text_area"><h4 class="weui_msg_title">请在微信客户端打开链接</h4></div></div>';
            }else{
                // 如果是微信浏览器，但是不是手机浏览器，就跳转qq官网
                var ok = /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent);
                if(!ok){
                    window.location.href =  "http://www.qq.com/";
                    return false;
                }
            }
            // 显示body
            document.body.style.display='block'
        });
    </script>
    <script>
        console.log('this common file');
    </script>


    <style>
        * {
            font-family: "微软雅黑"
        }

        body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,select,td {
            margin: 0;
            padding: 0;
        }

        body,html {
            margin: 0;
            color: #000;
            background: #f6f6f6;
            background-size: 100%;
            -webkit-tap-highlight-color: transparent
        }

        .head img {
            width: 100%
        }

        .main {
            position: relative;
            display: block;
            top: 0px;
            left: 0px;
            padding: 15px;
            text-align: center;
            border-radius: 40px;
            background-color: #fff;
            margin: 10px;
        }

        .t-t {
            font-size: 22px;
            line-height: 2em;
            text-align: center;
            margin-top: 10px;
        }

        .t-s {
            padding: 12px;
            background-color: #ffdc2b;
            border-radius: 18px;
            max-width: 100%;
            margin: 16px auto;
            text-align: center;
            position: relative;
            -webkit-transition: background-color .3s ease
        }

        .t-si {
            padding: 18px;
            background-color: #ffdc2b;
            border-radius: 18px;
            max-width: 100%;
            margin: 10px auto;
            text-align: center;
            position: relative;
            -webkit-transition: background-color .3s ease
        }

        .t-si span {
            font-size: 1.1em;
            line-height: 1.5em;
            font-weight: 700;
            color: #773a35;
            padding: 5px 20px
        }

        img {
            max-width: 100%
        }

        .t-s span {
            font-size: 1.1em;
            line-height: 1.5em;
            font-weight: 700;
            color: #773a35;
            padding: 5px 20px
        }

        .t-s.active span {
            color: #fff
        }

        .t-s.active {
            background-color: #9d75bd
        }

        .t-si span {
            font-size: 1.1em;
            line-height: 1.5em;
            font-weight: 700;
            color: #773a35;
            padding: 5px 20px
        }

        .t-s:after {
            background-color: #f00;
            position: absolute;
            right: 12px;
            top: 7px;
            padding: 5px;
            background: rgba(255,255,255,1);
            content: "√";
            display: none;
            opacity: 0.8;
            -webkit-transition: opacity 3s ease;
            font-size: 1.1em
        }

        .t-s.error:after {
            background: rgba(255,0,0,1);
            content: "×";
            color: #fff
        }

        .t-s.active:after {
            display: block;
            opacity: 1
        }

        .t-c {
            line-height: 1.5em;
            padding: 10px;
            margin-bottom: 10px;
            font-size: 0.95rem;
            text-align: left;
            color: #332625;
            overflow: hidden
        }

        .t-s.h {
            max-width: 60%;
            display: inline-block;
            margin-left: 5px;
            margin-right: 5px
        }

        .t-si.h {
            max-width: 60%;
            display: inline-block;
            margin-left: 5px;
            margin-right: 5px
        }

        .t-r {
            font-weight: 700;
            overflow: hidden
        }

        .t-r span {
            display: inline-block;
            vertical-align: middle;
            font-size: 50px;
            color: #27AE60;
            text-shadow: 3px 0 4px #16A085
        }

        .t-img {
            margin-top: 10px;
            margin-bottom: 10px
        }

        .t-img img {
            width: 240px;
            height: 180px;
            max-width: 90%
        }

        .t-btn,.t-btn:link,.t-btn:visited {
            color: #fff;
            background-color: #9d75bd;
            padding-top: 12px;
            padding-bottom: 13px;
            padding-left: 15px;
            padding-right: 15px;
            display: inline-block;
            line-height: 1em;
            min-width: 60%;
            margin: 10px auto;
            border-radius: 7px;
            text-decoration: none
        }

        .t-btn {
            font-size: 1.1em
        }

        .share {
            position: fixed;
            top: 0;
            right: 0;
            left: 0;
            bottom: 0;
            background: rgba(0,0,0,.6);
            display: none;
            z-index: 1000
        }

        .share img {
            position: absolute;
            top: 0;
            right: 0;
            width: 70%;
            max-width: 320px
        }

        .livetip {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0,0,0,.7);
            z-index: 200
        }

        .lt-w {
            position: fixed;
            top: 100px;
            left: 10px;
            right: 10px;
            z-index: 300
        }

        .lt-w .lt-c {
            background-color: #fff;
            padding-top: 10px;
            padding-bottom: 20px
        }

        a,a:link,a:visited {
            color: #fff;
            text-decoration: none;
        }

        .mane {
            width: 85%;
            margin-bottom: 10px;
            text-align: center;
            background: url(/mane.png) no-repeat;
            height: 56px;
            color: #773a35;
            font-weight: 600;
            font-size: 16px;
            line-height: 36px;
            background-size: 100%;
            text-overflow: ellipsis;
            white-space: nowrap;
            word-break: keep-all;
            padding: 0 25px;
            overflow: hidden
        }

        .scrollable {
            position: relative;
            width: 100%;
            height: 60px;
            overflow: hidden;
            text-align: center
        }

        .scrollable .items {
            height: 2000em;
            width: 100%;
            position: absolute;
            overflow: hidden
        }

        .scrollable .items img {
            height: 60px;
            width: 100%
        }

        .divmenu {
            width: 100%;
            color: #fff;
            margin-top: 45px;
            line-height: 40px;
            overflow: hidden
        }

        .divmenu a {
            color: #EFEFEF
        }

        .button {
            display: inline-block;
            zoom:1;height: 40px;
            vertical-align: baseline;
            margin: 0 2px;
            outline: 0;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            font: 16px/100% Arial,Helvetica,sans-serif;
            padding: .5em 2em .55em;
            text-shadow: 0 1px 1px rgba(0,0,0,.3);
            -webkit-border-radius: .5em;
            -moz-border-radius: .5em;
            border-radius: .5em;
            -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
            -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
            box-shadow: 0 1px 2px rgba(0,0,0,.2)
        }

        .button:hover {
            text-decoration: none
        }

        .button:active {
            position: relative;
            top: 1px
        }

        .t-img ul li {
            list-style: none;
            max-width: 100%;
            font-size: 18px;
        }

        select {
            width: 25%;
            height: 34px;
            line-height: 34px;
            border: 1px solid #9bc0dd;
            border-radius: 24px;
            padding-left: 20px;
            -webkit-appearance: none;
            text-align: center;
            font-size: 20px;
        }

        article {
            margin-top: 20px;
            background-color: #f6f6f6;
        }

        .list .box {
            background-color: #fff;
        }

        .list .box .title {
            width: 100%;
            text-align: center;
            height: 40px;
            line-height: 40px;
            background-color: #fff;
            flex-direction: row;
            justify-content: space-between;
        }

        .list .box .title h3 {
            margin-left: 8px;
            font-weight: bold;
        }

        .list .box ul {
            display: flex;
            padding-bottom: 40px;
            flex-direction: column;
            list-style: none;
            margin-left: 2.5%;
            width: 95%;
        }

        .list .box ul li {
            display: flex;
            flex-direction: row;
            position: relative;
            border-bottom: .05rem solid #f6f6f6;
            padding: .625rem 0;
        }

        .list .box .pic {
            width: 4.2rem;
            height: 4.2rem;
            border-radius: .25rem;
            background-size: cover;
            background-position: 50%;
            margin-top: .625rem;
        }

        .list .box .cen {
            width: 58%;
            padding: .5rem;
        }

        .list .box .cen h3 {
            color: #333;
            display: -webkit-box;
            font-size: 14px;
            font-weight: 500;
            line-height: 20px;
            text-overflow: ellipsis;
            padding-top: .2rem;
        }

        .list .box .cen .description {
            color: #8a8a8a;
            padding-top: .25rem;
            line-height: 1.2rem;
            height: 2.4rem;
            overflow: hidden;
            font-size: .75rem;
            text-overflow: ellipsis;
            display: -webkit-box;
        }

        .list .box .lat {
            display: flex;
            width: 18%;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .list .box .lat .go {
            color: #000;
            background-color: #ffdd2b;
            border-radius: .2rem;
            line-height: 40px;
            width: 50px;
            height: 40px;
            text-align: center;
            font-weight: 600;
        }

        .list .box .lat .donum {
            text-align: center;
            font-size: 12px;
            color: #8a8a8a;
        }
    </style>
</head>
<body class="loading">


<script>
    console.log('this common form');
    // 记录多少人来到了问题页面
    // $.get("/visit", {sign: "huojisui", visit_type: 1});
</script>



<link rel="stylesheet" href="/exam/source/exam/default/css/modal.css">

<div class="modal">
    <div class="modal-inner">
        <p id="guideText">关注我</p>
        <img src="" alt="" class="qrcode">
        <div style="font-size: 12px; color: #ccc;">长按二维码识别</div>
        <div class="close-btn"></div>
    </div>
</div>
<script>
    // 查看更多显示二维码
    // $('#guideText').html('关注我<br>会有更多好玩测试');
    // $('.qrcode').attr('src', '/getwxcode?v=' + getrd());
    //画二维码
    function drawQr() {
        // 制作本题的二维码
        let qrcode= $('#code').qrcode('http://qqhd.4455vwcom.cn/geturlcode/vDYO0-xinlei').hide();
        let canvas=qrcode.find('canvas').get(0);

        qr = new Image();
        //   qr.crossOrigin = "Anonymous";
        qr.onload = function () {
            let obj = imgPara("xy(350,850)","120","120","0");
            ctx.rotate(obj.rot * Math.PI / 180);//旋转角度
            ctx.drawImage(qr, obj.x, obj.y, obj.w, obj.h);
            ctx.rotate(-obj.rot * Math.PI / 180);//调整旋转起点
            datasToPng();
        }
        qr.src = canvas.toDataURL('image/jpg');
    }
    // 执行画二维码的操作
    // drawQr();
</script>




<style>
    .return-con {
        -webkit-text-size-adjust: none;
        display: flex;
        line-height: 45px;
        position: fixed;
        top: 0px;
        left: 0px;
        width: 100%;
        border-bottom: .01333rem solid #d0d0d0;
        background: #f6f6fb;
        z-index: 1200;
    }

    .return-btn {
        line-height: 45px;
        padding-left: 1.2rem;
        color: #000;
        display: flex;
        font-size: 16px;
        padding-right: 13px;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        position: relative;
    }

    .return-btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: .2rem;
        bottom: 0;
        margin: auto;
        width: 9px;
        height: 16px;
        background: url('') 50% no-repeat;
        background-size: .48rem auto;
    }
    .ts-btn {
        line-height: 45px;
        display: flex;
        position: fixed;
        right: 25px;
    }

    .ts-btn a {
        color: #000;
        text-decoration: none;
        font-size: 16px;
    }
</style>
<div class="return-con">
    <div  class="return-btn">返回</div>
    <div class="ts-btn">
        <a href="/complaint/index.html">投诉</a>
    </div>
</div>
<div class="divmenu"></div>
<div style="width:100%; height:5px;"></div>
<script>
    $('.return-btn').click(function() {
        history.back(-1);
    })
</script>
<div id="mcover" class="share" style="background:#1A1A1A;height: 100%;position: fixed;top: 0;width: 100%;z-index: 1;text-align: center;color: #FFFFFF;font-size: 30px;padding-top: 100px;font-weight: bold;display:none;">
    跳转中，请稍候......
</div>
<script src="/exam/source/exam/default/js/menu.js"></script>

<div class="head"></div>
<div class="main" id="main" ms-controller="test">

    <!-- 侧试题 -->
    <div ms-if="item.type=='hello'" >
        <div class="mane">测测你现在的心有多累？</div>

        <div class="t-c" ms-if="item.text">
            {{item.text}}
        </div>
        <div class="t-img" ms-if="item.img">
            <img ms-attr-src="{{item.img}}">
        </div>
        <div class="t-s h" ms-repeat-elem="item.select" ms-class-active="elem.active"  ms-on-click="elem.tap(elem, item.select)">
            <span>{{elem.text}}</span>
        </div>

<!--        <div class="t-btn"><a href="javascript:void(0)" id='restart-btn'>我想玩其他好玩的</a></div>-->
<!--        <script>-->
<!--            $('#restart-btn').on('click', function () {-->
<!--                $('.modal').show();-->
<!--            });-->
<!--            $('.modal .close-btn').on('click', function () {-->
<!--                $('.modal').hide();-->
<!--                location.href="/";-->
<!--            })-->
<!--        </script>-->
    </div>
    <div ms-if="item.type=='select'">
        <div class="mane">测测你现在的心有多累？</div>

        <div class="t-c">
            {{item.text}}
            <div ms-if="item.img" style="margin-bottom:0.5em;">
                <img ms-attr-src="{{item.img}}">
            </div>
        </div>
        <div class="t-s" ms-repeat-elem="item.select" ms-class-active="elem.active" ms-on-click="elem.tap(elem, item.select)">
            <img ms-if="!!elem.img" ms-attr-src="{{elem.img}}">
            <span>{{elem.text}}</span>
        </div>
<!--        <div class="t-btn"><a href="/">我想玩其他好玩的</a></div>-->

    </div>


    <div class="livetip" ms-visible="livetip" ms-on-tap="hidelivetip()">
    </div>
    <div id="sans">
        <style> .t-btn
            {
                color: #fff;
                background-color: #9d75bd;
                padding-top: 12px;
                padding-bottom: 13px;
                padding-left: 15px;
                padding-right: 15px;
                display: inline-block;
                line-height: 1em;
                min-width: 60%;
                margin: 10px auto;
                border-radius: 7px;
                text-decoration: none;
            }</style>
    </div>
</div>

<?php include_once '../../common/article.php'?>


<script>


    var ID = getQueryString("sid") || Date.now() + "" + Math.floor(Math.random() * 1000);
    var fen = 0;
    function tap(elemvm, select, cb) {
        var a = false;
        for (var i = 0; i < select.length; i++) {
            a = a || select[i].active;
        };
        if (!a) {
            elemvm.active = true;
            setTimeout(function () {
                cb && cb()
            }, 300)
        }
    }
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = location.search.substr(1).match(reg);
        if (r != null) return unescape(decodeURI(r[2])); return null;
    }
    var model = avalon.define("test", function (vm) {
        vm.arr = [
            {
                type: "hello",
                text: "心累是“心”对生活、压力的主观感知！导致人们心累的原因有很多，比如想太多、减肥始终不成功、钱不够花...那么你的心有多累？快来测试一下吧~",
                select: [
                    {
                        text: "开始侧试",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select, function () {
                                model.item = model.arr[1];
                                model.result.sex = 0;
                            });
                        }
                    }
                ]
            },
            {
                type: "select",
                id: 1,
                text: "这张图片给你的感觉是：",
                img: imgurl + "/xinlei/img/1.jpg",
                select: [
                    {
                        text: "唯美",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 3;
                                    model.item = model.arr[2];


                                });
                        }
                    },
                    {
                        text: "悲伤",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 2;
                                    model.item = model.arr[2];


                                });
                        }
                    }, {
                        text: "感动",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 4;
                                    model.item = model.arr[2];


                                });
                        }
                    },

                    {
                        text: "广阔",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 1;
                                    model.item = model.arr[2];


                                });
                        }
                    }
                ]
            },


            {
                type: "select",
                id: 2,
                text: "什么最能提起你的兴致？",
                select: [
                    {
                        text: "共同话题",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 3;
                                    model.item = model.arr[3];


                                });
                        }
                    },
                    {
                        text: "买买买吃吃吃玩玩玩",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 4;
                                    model.item = model.arr[3];


                                });
                        }
                    }, {
                        text: "运动",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 2;
                                    model.item = model.arr[3];


                                });
                        }
                    }, {
                        text: "睡觉",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 1;
                                    model.item = model.arr[3];


                                });
                        }
                    }
                ]
            },


            {
                type: "select",
                id: 3,
                text: "这张图片中，你的视线会落在：",
                img: imgurl + "/xinlei/img/2.jpg",
                select: [
                    {
                        text: "大雁",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 1;
                                    model.item = model.arr[4];


                                });
                        }
                    },
                    {
                        text: "女孩",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 3;
                                    model.item = model.arr[4];


                                });
                        }
                    }, {
                        text: "焉焉的花",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 2;
                                    model.item = model.arr[4];


                                });
                        }
                    }
                    , {
                        text: "日落",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 5;
                                    model.item = model.arr[4];


                                });
                        }
                    }
                    , {
                        text: "水面",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 6;
                                    model.item = model.arr[4];


                                });
                        }
                    }

                ]
            },


            {
                type: "select",
                id: 4,
                text: "你正在为你的理想奋斗吗？",

                select: [
                    {
                        text: "是的，不然和咸鱼有什么区别",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 3;
                                    model.item = model.arr[5];


                                });
                        }
                    },
                    {
                        text: "理想是什么？好吃吗？",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 2;
                                    model.item = model.arr[5];


                                });
                        }
                    }, {
                        text: "曾经试过，现在只想安稳",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen +=4;
                                    model.item = model.arr[5];


                                });
                        }
                    }
                    , {
                        text: "不，我只想吃喝玩乐",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 1;
                                    model.item = model.arr[5];


                                });
                        }
                    }
                ]
            },


            {
                type: "select",
                id: 5,
                text: "你认为ta为什么要奔跑？",
                img: imgurl + "/xinlei/img/3.jpg",
                select: [
                    {
                        text: "地面太烫",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 4;
                                    model.item = model.arr[6];


                                });
                        }
                    },
                    {
                        text: "家人正等着救命呢",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 1;
                                    model.item = model.arr[6];


                                });
                        }
                    }
                    ,
                    {
                        text: "害怕别人抢走罐子",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 1;
                                    model.item = model.arr[6];


                                });
                        }
                    }
                    ,
                    {
                        text: "快下雨了去接水",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 1;
                                    model.item = model.arr[6];


                                });
                        }
                    }
                ]
            },
            {
                type: "select",
                id: 6,
                text: "你想给这张图配个啥名字？",
                img: imgurl + "/xinlei/img/4.jpg",
                select: [
                    {
                        text: "看什么看",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 1;
                                    model.item = model.arr[7];


                                });
                        }
                    },
                    {
                        text: "惊鸿一瞥",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 2;
                                    model.item = model.arr[7];


                                });
                        }
                    }, {
                        text: "深情对视",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 3;
                                    model.item = model.arr[7];


                                });
                        }
                    }, {
                        text: "瞅你咋滴",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 3;
                                    model.item = model.arr[7];


                                });
                        }
                    }
                ]
            },
            {
                type: "select",
                id: 7,
                text: "你想像这个孩子一样，痛哭一场吗？",
                img: imgurl + "/xinlei/img/5.jpg",
                select: [
                    {
                        text: "想，但是我不能哭",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 4;
                                    model.item = model.arr[8];


                                });
                        }
                    },
                    {
                        text: "不想，我心情挺好的",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 3;
                                    model.item = model.arr[8];


                                });
                        }
                    }, {
                        text: "有啥好想的，想哭就哭",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 2;
                                    model.item = model.arr[8];


                                });
                        }
                    }, {
                        text: "有点想，感觉心里有块大石头",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 1;
                                    model.item = model.arr[8];


                                });
                        }
                    }
                ]
            },
            {
                type: "select",
                id: 8,
                text: "没吃两口的冰淇淋掉地上了，你的心里感受是：",
                img: imgurl + "/xinlei/img/6.jpg",
                select: [
                    {
                        text: "我靠，真倒霉",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 1;
                                    model.item = model.arr[9];
                                });
                        }
                    },
                    {
                        text: "感觉很不爽，想打人",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 4;
                                    model.item = model.arr[9];
                                });
                        }
                    }, {
                        text: "没什么啊，这都是小事",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 3;
                                    model.item = model.arr[9];
                                });
                        }
                    }, {
                        text: "再买一根",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,
                                function () {
                                    fen += 2;
                                    model.item = model.arr[9];


                                });
                        }
                    }
                ]
            },
            {
                type: "result",
            }

        ];
        vm.item = vm.arr[0];
        vm.result = {
            sex: 0
        }
        vm.shared = false;
        vm.sharebox = function () {
            model.showshare = true;
        }
        vm.livetip = false;
        vm.hidelivetip = function () {
            model.livetip = false;
        }
        vm.livenow = function () {

        }
        vm.showxz = function () {
            model.xunzhang = true;
        }
        vm.$watch("item", function (newval) {
            if (newval.type == 'result') {
                tarShare(getrd(1, 4));
                return false;
            };
            if (newval.id == 1) {
                $("article").hide();
                return false;
            };
        })
    });

    document.body.className = "";
    function tarShare(score) {
        showShareTip();

        var url = share_url + "share/xinlei?id=" + score + "&sstext1=" + model.item.sstext1 + "&res=" + getletter(10);
        location.href = url;
        return false;
    }
    function showShareTip() {
        document.getElementById('mcover').style.display = 'block';
    }
</script>


<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?<?php echo $data['baidu_id']?>";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<script>
    console.log('this common footer');
    $.ajax({
        'url' : 'http://<?php echo $data['d6'];?>/count_views.php',
        'type' : 'POST',
        'data': {res: 'friend'},
        'success' : function(){}
    });
</script>


<script type="text/javascript">
    function onBridgeReady() {
        WeixinJSBridge.call('hideOptionMenu');
    }
    if (typeof WeixinJSBridge == "undefined") {
        if (document.addEventListener) {
            document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
        } else if (document.attachEvent) {
            document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
            document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
        }
    } else {
        onBridgeReady();
    }
</script>
</body>
</html>
